package _991GuanChaZhe;

import _991GuanChaZhe.sub.BinaryObserver;
import _991GuanChaZhe.sub.HexaObserver;
import _991GuanChaZhe.sub.OctalObserver;

/**
 * @Test: 观察者模式 测试类
 * @author: ZBoHang
 * @time: 2021/9/17 15:44
 */
class Test {
    public static void main(String[] args) {
        Subject subject = new Subject();

        new HexaObserver(subject);
        new OctalObserver(subject);
        new BinaryObserver(subject);

        System.out.println("@@@@@@@@");
        subject.setState(15);
        System.out.println("********");
        subject.setState(10);
    }
}
